<?php
session_start();
if (isset($_POST['openid']) && !empty($_POST['openid'])){
    include '../c/config.php';
    include 'thearray.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $openid=addslashes(trim($_POST['openid']));
    $query=$mysqli->query("SELECT name FROM uinfo where openid='".$openid."' limit 0,1 ");
    $user=array('name'=>'');
    if($query->num_rows>0){
        $getUser=$query->fetch_assoc();
        $user['name']=$getUser['name']; 
    }
    $mysqli->close();
    
    echo json_encode(array('u'=>$user));
}

